<template>
  <div id="app">
    <!-- 中间内容是要切换的  - vue-router  -->
    <router-view></router-view>
    <tab-bar-comp v-if='flag'></tab-bar-comp>
  </div>
</template>

<script>

// 底部导航
import TabBarComp from 'Comp/TabBarComp'
export default {
  components: {
    TabBarComp
  },
  data(){
    return{
      flag: true
    }
  },
  watch:{
    $route(){
      const { path } = this.$route
      if(path.indexOf('/login')!= -1){
        this.flag = false
      }else{
        this.flag = true
      }
    }
  }
}
</script>

<style lang="scss">
  #app{
    display: flex;
    flex-direction: column;
  }
</style>
